package com.cz073586.technology.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import com.cz073586.common.entity.pojo.PageInfo;

@Entity
@Table(name = "topic_info")
public class TopicInfo extends PageInfo<TopicInfo>{
    @NotEmpty
    @Length(min=1,max=32)
    @Column(name = "uuid")
    private String uuid;

    @Column(name = "title")
    private String title;

    @Column(name = "img_url")
    private String imgUrl;

    @Column(name = "create_at")
    private Date createAt;

    @Column(name = "comment_count")
    private Integer commentCount;

    @Column(name = "user_key")
    private String userKey;

    @Column(name = "content")
    private String content;

    @Column(name = "type")
    private Integer type;
    
    @Column(name = "bind_to_id")
    private String bindToId;
    
    @Column(name = "top")
    private Integer top;
    
    @Column(name = "is_close")
    private String isClose;
    
    private String userName;
    
    private List<AdInfo> listAdInfo;
    
    //发帖的分值
    private Integer score;
    
	public Integer getTop() {
		return top;
	}

	public void setTop(Integer top) {
		this.top = top;
	}

	public String getIsClose() {
		return isClose;
	}

	public void setIsClose(String isClose) {
		this.isClose = isClose;
	}

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public Integer getScore()
	{
		return score;
	}

	public void setScore(Integer score)
	{
		this.score = score;
	}

	public String getBindToId()
	{
		return bindToId;
	}

	public void setBindToId(String bindToId)
	{
		this.bindToId = bindToId;
	}

	public List<AdInfo> getListAdInfo()
	{
		return listAdInfo;
	}

	public void setListAdInfo(List<AdInfo> listAdInfo)
	{
		this.listAdInfo = listAdInfo;
	}

	public Integer getType()
	{
		return type;
	}

	public void setType(Integer type)
	{
		this.type = type;
	}

	public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid == null ? null : uuid.trim();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl == null ? null : imgUrl.trim();
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public String getUserKey() {
        return userKey;
    }

    public void setUserKey(String userKey) {
        this.userKey = userKey == null ? null : userKey.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }
}